/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.service;

import com.sigmatrix.h5.dto.SyncTaskData;
import com.sigmatrix.h5.entity.SyncTask;
import com.sigmatrix.h5.exception.ServiceException;
import com.sigmatrix.h5.response.Response;
import com.sigmatrix.h5.service.common.BaseService;
import com.sigmatrix.h5.web.vo.SyncTaskVo;

/**
 * @ClassName: SyncTaskService
 * @Description: 异步任务业务层接口
 * @author youjun 
 * @date 2017-11-27 16:04:46
 */
public interface SyncTaskService extends BaseService<SyncTaskData> {

	/**
	 * @Title: findById
	 * @Description: 根据主键查找异步任务
	 * @return Response
	 * @author youjun 
	 * @date 2017-11-27 16:04:46
	 * @param id
	 * @param enterpriseCode
	 * @return
	 * @throws SigmatrixServiceException
	 */
	Response findById(Integer id, String enterpriseCode) throws ServiceException;

	/**
	 *@Title: save
	 *@Description: TODO()
	 *@return int
	 *@author youjun
	 *@date 2017年11月27日 下午6:20:50
	 *@param syncTaskVo
	 *@return
	 * @throws SigmatrixServiceException 
	 */
	int save(SyncTaskVo syncTaskVo)  throws ServiceException;

	/**
	 *@Title: updateByCondition
	 *@Description: TODO()
	 *@return void
	 *@author youjun
	 *@date 2017年11月27日 下午7:48:14
	 *@param enterpriseCode
	 *@param syncTaskId
	 *@param updateSyncTask
	 */
	void updateByCondition(String enterpriseCode, int syncTaskId, SyncTask updateSyncTask) throws ServiceException;

	/**
	 *@Title: updateStatus
	 *@Description: TODO()
	 *@return void
	 *@author youjun
	 *@date 2017年11月27日 下午8:10:38
	 *@param enterpriseCode
	 *@param syncTaskId
	 *@param syncTaskStatusHandleIng
	 */
	void updateStatus(String enterpriseCode, int syncTaskId, short syncTaskStatusHandleIng) throws ServiceException;

	/**
	 *@Title: updateSyncErrorMsg
	 *@Description: 更新异步操作出错消息,不抛出异常
	 *@return void
	 *@author youjun
	 *@date 2017年11月30日 上午10:29:10
	 *@param enterpriseCode
	 *@param syncTaskId
	 *@param string
	 */
	void updateSyncErrorMsg(String enterpriseCode, Integer syncTaskId, String syncErrorMsg);

}
